from django.contrib.auth.decorators import login_required
from django.urls import path
from .views import business_views, type_views, contract_views, conrulecode_views

# 2.x后必须指定app_name
app_name = 'business'

urlpatterns = [
    path('customers_view/', login_required(business_views.poll_view), name='customers_view'),
    path('customers_list/', login_required(business_views.poll_list), name='customers_list'),
    path('customers_list1/', login_required(business_views.poll_list1), name='customers_list1'),
    path('customers_insert_view/', login_required(business_views.poll_insert_view), name='customers_insert_view'),
    path('customers_insert/', login_required(business_views.poll_insert), name='customers_insert'),
    path('customers_edit_view/', login_required(business_views.poll_edit_view), name='customers_edit_view'),
    path('customers_edit/<int:id>', login_required(business_views.poll_edit), name='customers_edit'),
    path('customers_search/', login_required(business_views.poll_search), name='customers_search'),
    path('customers_apply_view/', login_required(business_views.poll_apply_view), name='customers_apply_view'),
    path('customers_apply/', login_required(business_views.poll_apply), name='customers_apply'),
    # 业务类型
    path('type_view/', login_required(type_views.type_view), name='type_view'),
    path('type_list/<int:id>', login_required(type_views.type_list), name='type_list'),
    path('type_list1/', login_required(type_views.type_list1), name='type_list1'),
    path('type_insert_view/', login_required(type_views.type_insert_view), name='type_insert_view'),
    path('type_insert/', login_required(type_views.type_insert), name='type_insert'),
    path('type_edit_view/', login_required(type_views.type_edit_view), name='type_edit_view'),
    path('type_edit/<int:id>', login_required(type_views.type_edit), name='type_edit'),
    path('type_del/<int:id>', login_required(type_views.type_del), name='type_del'),
    # 约定书
    path('contract_view/', login_required(contract_views.contract_view), name='contract_view'),
    path('contracts_list/', login_required(contract_views.contracts_list), name='contracts_list'),
    path('contracts_insert_view/', login_required(contract_views.contracts_insert_view), name='contracts_insert_view'),
    path('contracts_insert/', login_required(contract_views.contracts_insert), name='contracts_insert'),
    path('contracts_edit_view/', login_required(contract_views.contracts_edit_view), name='contracts_edit_view'),
    path('contracts_edit/<int:id>', login_required(contract_views.contracts_edit), name='contracts_edit'),
    path('con_search/', login_required(contract_views.con_search), name='con_search'),
    # 约定书附件
    path('confiles_view/', login_required(contract_views.confiles_view), name='confiles_view'),
    path('confiles_list/', login_required(contract_views.confiles_list), name='confiles_list'),
    path('confiles_insert_view/', login_required(contract_views.confiles_insert_view), name='confiles_insert_view'),
    path('confiles_contracts/', login_required(contract_views.confiles_contracts), name='confiles_contracts'),
    path('confiles_uploads/', login_required(contract_views.confiles_uploads), name='confiles_uploads'),
    path('confiles_uploads1/', login_required(contract_views.confiles_uploads1), name='confiles_uploads1'),
    path('confiles_del/<int:id>', login_required(contract_views.confiles_del), name='confiles_del'),
    path('confiles_search/', login_required(contract_views.confiles_search), name='confiles_search'),
    # 预定书编码
    path('conrulecode_view/', login_required(conrulecode_views.conrulecode_view), name='conrulecode_view'),
    path('rules_list/', login_required(conrulecode_views.rules_list), name='rules_list'),
    path('rules_insert_view/', login_required(conrulecode_views.rules_insert_view), name='rules_insert_view'),
    path('rules_insert/', login_required(conrulecode_views.rules_insert), name='rules_insert'),
    path('rules_edit_view/', login_required(conrulecode_views.rules_edit_view), name='rules_edit_view'),
    path('rules_edit/<int:id>', login_required(conrulecode_views.rules_edit), name='rules_edit'),
    path('rules_del/<int:id>', login_required(conrulecode_views.rules_del), name='rules_del'),
    path('rules_dateset/', login_required(conrulecode_views.rules_dateset), name='rules_dateset'),
    path('rules_search/', login_required(conrulecode_views.rules_search), name='rules_search'),
]
